From: Jyrki Gadinger Date: Thu, 24 Apr 2025 16:04:35 +0000 (+0200) Subject: fix(gui): don't append another slash to the relative path X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1^2~13^2~1^2~35^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=43b31c8dd57b1cc609beb478418c2988406f260f;p=nextcloud-desktop.git fix(gui): don't append another slash to the relative path Signed-off-by: Jyrki Gadinger --- diff --git a/src/gui/invalidfilenamedialog.cpp b/src/gui/invalidfilenamedialog.cpp index c2bd029e5..c6cf31da0 100644 --- a/src/gui/invalidfilenamedialog.cpp +++ b/src/gui/invalidfilenamedialog.cpp @@ -83,7 +83,9 @@ InvalidFilenameDialog::InvalidFilenameDialog(AccountPtr account, const auto filePathFileInfo = QFileInfo(_filePath); _relativeFilePath = filePathFileInfo.path() + QStringLiteral("/"); _relativeFilePath = _relativeFilePath.replace(folder->path(), QStringLiteral("")); - _relativeFilePath = _relativeFilePath.isEmpty() ? QStringLiteral("") : _relativeFilePath + QStringLiteral("/"); + if (!(_relativeFilePath.isEmpty() || _relativeFilePath.endsWith(QStringLiteral("/")))) { + _relativeFilePath += QStringLiteral("/"); + } _originalFileName = _relativeFilePath + filePathFileInfo.fileName();